using System;
using System.Collections.Generic;
using System.Text;

namespace Cobalt75.GreyMatter.TesterTypes
{
    [
    GMTable(
        TableName = "plus",
        TableID = "PLU",
        ApproxSize = 30000,
        Priority = 5
        )
    ]
    public class Plu : GMTable
    {
        public Plu(GMCommunicator com)
            : base(com)
        {
            _Properties = new GMIndexedRelation<Property, PropertyType>(this);
            _Style = new GMRelation<Style>(this);
            _Style.Caching = GMRelationCaching.Updating;
        }
        [GMColumn]
        private GMRelation<Style> _Style;
        public Style Style
        {
            get
            {
                return (_Style.Value);
            }
            set
            {
                
                _Style.Value = value;
            }
        }
        [GMColumn]
        private string _Barcode = "";
        public string Barcode
        {
            get
            {
                return _Barcode;
            }
            set
            {
                _Barcode = value;
                Changed();
            }
        }
        
        [GMRelationColumn()]
        private GMIndexedRelation<Property, PropertyType> _Properties;
        /// <summary>
        /// Properties is an indexed relation...
        /// </summary>
        public GMIndexedRelation<Property, PropertyType> Properties
        {
            get
            {
                return _Properties;
            }
        }
        
    }
}
